<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- used by PreviewInventoryOrder.jsp -->
	<tr>	
	   <td colspan="7">
			<table cellpadding="0" cellspacing="0" style="width: 100%" border="0" id="org_table">
			 	<tr class="PBAOuterTableTitale">
			 		<th>&nbsp;</th>
			 		<th colspan="5"><%@ include file="../common/HeadqCustInput.jsp"%></th>				 					 				 					 									 		
			 		<th colspan="5" align="left">仓库开始时间&nbsp; :&nbsp;   <input type="text" name="formBean.order.order_StartTime" size="28" readonly="readonly" class="easyui-textbox"  value="<s:date name="formBean.order.order_StartTime" format="yyyy-MM-dd HH:mm:ss" />"/></th>
			 		<th colspan="8">订单号&nbsp; :&nbsp; <s:property value="formBean.order.order_ID"/> </th>	 
			 	</tr>
			    <tr height="10">
	  	            <th colspan="18"></th>
	            </tr>
			 	<tr class="PBAOuterTableTitale">
			 				 		
			 		<th colspan="7" align="right">单据输入&nbsp; :&nbsp; 
			 		       <s:select name="formBean.order.order_Keeper.user_id" cssClass="easyui-combobox"
									style="width:100px" id="keeper_id"  list="uiBean.users" listKey="user_id" listValue="user_name" headerKey="0" headerValue="-------" />			 		
                           &nbsp;&nbsp; 扫描&nbsp; :&nbsp; 
                           <s:select name="formBean.order.order_scanner.user_id" cssClass="easyui-combobox"
									style="width:130px" id="scanner_id"  list="uiBean.users" listKey="user_id" listValue="user_name" headerKey="0" headerValue="-----------" />
									点数&nbsp; :&nbsp; 
			 		       <s:select name="formBean.order.order_Counter.user_id" cssClass="easyui-combobox"
									style="width:130px" id="counter_id"  list="uiBean.users" listKey="user_id" listValue="user_name" headerKey="0" headerValue="-----------" />			 		</th>	
			 		<th colspan="2" align="center">库房&nbsp; :&nbsp; 
			 			<s:select name="formBean.order.store.id" id="storeId"  list="uiBean.stores" listKey="id" listValue="name" style="width:80px" cssClass="easyui-combobox" data-options="editable:false" />
			 		</th>
			 		<th colspan="1" align="center">
			 				<s:select name="formBean.fullOrSingle" id="fullOrSingle"   list="#{'0':'齐手','1':'单件'}" listKey="key" listValue="value" style="width:65px" cssClass="easyui-combobox" data-options="editable:false" >
						   </s:select>
			 		</th>
			 		<th  colspan="5"  align="left">
			 		          单价:
			 		      <s:select name="" id="topSalesPrice"   list="#{'':'-----','预设价1':'预设价1','预设价2':'预设价2','预设价3':'预设价3','厂家价':'厂家价','千禧价':'千禧价'}" listKey="key" listValue="value" style="width:80px" cssClass="easyui-combobox" data-options="editable:false" >
						  </s:select>

                        	折扣:
			 		      <s:textfield  cssClass="easyui-numberbox"  id="topDiscount"  size="3"   data-options="onChange:function(){checkPriceAndDiscount();}, min:0,max:1,precision:2" />
							批发价&nbsp;:
			 		      <s:textfield  cssClass="easyui-numberbox" id="TopWholeSalePrice"  data-options="onChange:function(){checkPriceAndDiscount();}, min:0,precision:2" size="3" />
			 		      <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'"  onclick="updateSalesList();" style="width:60px">应用</a>			 		
			 		</th>
			 	
			 		<th></th>	
			 		<th></th>						 		
					<th></th> 		
					<th></th> 
			 	</tr>
				<tr height="10">
					<th colspan="18"></th>
				</tr>			 	
			 	<tr class="
						    <s:if test="formBean.order.order_type == 0">
							    procureTableTop
						    </s:if>
						    <s:elseif test="formBean.order.order_type == 1">
							    returnProcureTableTop
							</s:elseif>					
							" height="22">
		 		    <th style="width: 4%">&nbsp;</th>
			 		<th style="width: 8%">条型码</th>			 					 				 		
			 		<th style="width: 5%">产品货号</th>
			 		<th style="width: 5%">公司货号</th>
			 		<th style="width: 4%">颜色</th>
			 		<th style="width: 5%">产品品牌</th>	
			 		<th style="width: 5%">品牌备注</th>	
			 		<th style="width: 4%">年份</th>	
			 		<th style="width: 4%">季度</th>	
			 		<th style="width: 8%">数量</th>
			 		<th style="width: 5%">单位</th>		
			 		<th style="width: 7%">单价</th>
			 		<th style="width: 5%">折扣</th>
			 		<th style="width: 6%">批发价</th>
			 		<th style="width: 4%">连锁零售</th>
			 		<th style="width: 6%">库存</th>	
			 		<th style="width: 3%">图片</th> 
			 		<th style="width: 3%">客户库存</th> 
			 		<th style="width: 3%">删除</th> 		 		
                </tr>
                <tbody  id="inventoryTable">
	                <s:iterator value="formBean.order.product_List" status = "st" id="orderProduct" >
					 	<tr id="row<s:property value="#st.index"/>"  class="excelTable">
					 		<td align="center"><s:property value="#st.index +1"/><input type="hidden" name="formBean.order.product_List[<s:property value="#st.index"/>].ID" value="<s:property value="#orderProduct.ID"/>"/></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.barcode" id="barcode<s:property value="#st.index"/>" readonly="readonly" value="<s:property value="#orderProduct.productBarcode.barcode"/>"  size='10'/>
					 		    <input type="hidden" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.id" id="productId<s:property value="#st.index"/>" readonly="readonly" value="<s:property value="#orderProduct.productBarcode.id"/>"/>					 		</td>			 					 		
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.productCode" id="productCode<s:property value="#st.index"/>"  size='8' value="<s:property value="#orderProduct.productBarcode.product.productCode"/>"/><input type="hidden" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.numPerHand" id="numPerHand<s:property value="#st.index"/>" readonly="readonly"  value="<s:property value="#orderProduct.productBarcode.product.numPerHand"/>"/></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.productIdentity" id="productIdentity<s:property value="#st.index"/>"  size='9' value="<s:property value="#orderProduct.productBarcode.product.productIdentity"/>"/></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.color.name" id="color<s:property value="#st.index"/>" readonly="readonly"  size='2' value="<s:property value="#orderProduct.productBarcode.color.name"/>"/></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.brand.brand_Name" id="brand<s:property value="#st.index"/>" readonly="readonly"  size='11' value="<s:property value="#orderProduct.productBarcode.product.brand.brand_Name"/>"/></td>			 					 		
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.brand.brand_comment" id="brand<s:property value="#st.index"/>" readonly="readonly"  size='11' value="<s:property value="#orderProduct.productBarcode.product.brand.comment"/>"/></td>			 					 							 		
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.year.year" id="year<s:property value="#st.index"/>" readonly="readonly"  size='2' value="<s:property value="#orderProduct.productBarcode.product.year.year"/>"/></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.quarter.quarter_Name" id="quarter<s:property value="#st.index"/>" readonly="readonly"  size='2' value="<s:property value="#orderProduct.productBarcode.product.quarter.quarter_Name"/>"/></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].quantity" id="quantity<s:property value="#st.index"/>" size='2' onchange="onQuantityChange(<s:property value="#st.index"/>);" onfocus="this.select();" value="<s:property value="#orderProduct.quantity"/>"/><s:if test="#orderProduct.moreThanTwoHan">*</s:if></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.unit" id="unit<s:property value="#st.index"/>" readonly="readonly"  size='3' value="<s:property value="#orderProduct.productBarcode.product.unit"/>"/></td>			 					 		
					 		<td align="center"><select id="priceSlect<s:property value="#st.index"/>" name="formBean.order.product_List[<s:property value="#st.index"/>].salePriceSelected" onchange="onWholeSalePriceChange(3,<s:property value="#st.index"/>);">
						           <option value='<s:property value="#orderProduct.productBarcode.product.wholeSalePrice"/>' <s:if test="#orderProduct.productBarcode.product.wholeSalePrice == #orderProduct.salePriceSelected">selected</s:if>>预设价1 <s:property value="#orderProduct.productBarcode.product.wholeSalePrice"/></option>
								   <option value='<s:property value="#orderProduct.productBarcode.product.wholeSalePrice2"/>' <s:if test="#orderProduct.productBarcode.product.wholeSalePrice2 == #orderProduct.salePriceSelected">selected</s:if>>预设价2 <s:property value="#orderProduct.productBarcode.product.wholeSalePrice2"/></option>
                                   <option value='<s:property value="#orderProduct.productBarcode.product.wholeSalePrice3"/>' <s:if test="#orderProduct.productBarcode.product.wholeSalePrice3 == #orderProduct.salePriceSelected">selected</s:if>>预设价3 <s:property value="#orderProduct.productBarcode.product.wholeSalePrice3"/></option>
                                   <option value='<s:property value="#orderProduct.productBarcode.product.salesPriceFactory"/>' <s:if test="#orderProduct.productBarcode.product.salesPriceFactory == #orderProduct.salePriceSelected">selected</s:if>>厂家价 <s:property value="#orderProduct.productBarcode.product.salesPriceFactory"/></option>		      
                                   <option value='<s:property value="#orderProduct.productBarcode.product.salesPrice"/>' <s:if test="#orderProduct.productBarcode.product.salesPrice == #orderProduct.salePriceSelected">selected</s:if>>千禧价 <s:property value="#orderProduct.productBarcode.product.salesPrice"/></option>		  
						        </select></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].discount" id="discount<s:property value="#st.index"/>" onchange="onWholeSalePriceChange(1,<s:property value="#st.index"/>);" onfocus='this.select();' size='3' value="<s:property value="#orderProduct.discount"/>"/></td>
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].wholeSalePrice" id="wholeSalePrice<s:property value="#st.index"/>" onchange='onWholeSalePriceChange(2,<s:property value="#st.index"/>);'  size='8' value="<s:property value="#orderProduct.wholeSalePrice"/>"   onfocus="this.select();"/></td>			 							 		
					 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].salesPrice" id="salesPrice<s:property value="#st.index"/>" readonly="readonly"  size='8' value="<s:property value="#orderProduct.salesPrice"/>"/></td>
					 		<td align="center"><div id="takeBefore0" style="display:block;color:red"><s:if test="#orderProduct.productBarcode.boughtBefore > 0">已配<s:property value="#orderProduct.productBarcode.boughtBefore"/></s:if></div><input type="hidden" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.boughtBefore" id="boughtBefore<s:property value="#st.index"/>" size='14' value="0"/></td>
					 		<td align="center"><div id="viewIcon0" style="display:block"><img src="<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/img3.png" border="0" onclick="viewImgSale('<s:property value="#st.index"/>',<s:property value="#st.index"/>);"  style="cursor:pointer;"/></div></td>
					 		<td align="center"><div id="clientInfoIcon0" style="display:block"><img src="<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/inventory.png" border="0" onclick="viewClientInfor(<s:property value="#st.index"/>);"  style="cursor:pointer;"/></div></td>
					 		<td align="center"><div id="delIcon0" style="display:block"><img src="<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/delete2.png" border="0" onclick="deleteRow('row<s:property value="#st.index"/>',<s:property value="#st.index"/>);"  style="cursor:pointer;"/></div></td>		
					 		<td style="display:none"><input type="text" name="formBean.order.product_List[<s:property value="#st.index"/>].productBarcode.product.brand.brand_ID" id="brand<s:property value="#st.index"/>" readonly="readonly"  size='22' value="<s:property value="#orderProduct.productBarcode.product.brand.brand_ID"/>"/></td>			 					 		
		                </tr>
	                </s:iterator>
				 	<tr height="22" id="row<s:property value='formBean.order.product_List.size()'/>" class="excelTable">
				 		<td align="center"><s:property value='formBean.order.product_List.size() +1'/></td>
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.barcode" id="barcode<s:property  value='formBean.order.product_List.size()'/>"  size='10'/>
					 	    <input type="hidden" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.id" id="productId<s:property  value='formBean.order.product_List.size()'/>"/>					 	</td>			 					 		
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.productCode" id="productCode<s:property value='formBean.order.product_List.size()'/>"  size='8'/><input type="hidden" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.numPerHand" id="numPerHand<s:property value='formBean.order.product_List.size()'/>" size='14' value="0"/></td>
				 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.productIdentity" id="productIdentity<s:property value='formBean.order.product_List.size()'/>"  size='9'/></td>
				 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.color.name" id="color<s:property value='formBean.order.product_List.size()'/>" readonly="readonly"  size='2'/></td>
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.brand.brand_Name" id="brand<s:property value='formBean.order.product_List.size()'/>" readonly="readonly"  size='11'/></td>			 					 		
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.brand.brand_comment" id="brand<s:property value='formBean.order.product_List.size()'/>" readonly="readonly"  size='11'/></td>	
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.year.year" id="year<s:property value='formBean.order.product_List.size()'/>" readonly="readonly"  size='2'/></td>
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.quarter.quarter_Name" id="quarter<s:property value='formBean.order.product_List.size()'/>" readonly="readonly"  size='2'/></td>
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].quantity" id="quantity<s:property value='formBean.order.product_List.size()'/>" size='2' value="0" onchange="onQuantityChange(<s:property value='formBean.order.product_List.size()'/>);"  onfocus="this.select();"/></td>
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.product.unit" id="unit<s:property value='formBean.order.product_List.size()'/>" readonly="readonly"  size='3'/></td>			 					 		
					 	<td align="center"><select id="priceSlect<s:property value='formBean.order.product_List.size()'/>" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].salePriceSelected" onchange="onWholeSalePriceChange(3,<s:property value='formBean.order.product_List.size()'/>);">
						    </select></td>
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].discount" id="discount<s:property value='formBean.order.product_List.size()'/>" onchange="onWholeSalePriceChange(1,<s:property value='formBean.order.product_List.size()'/>);" onfocus='this.select();'  size='3'/></td>
					 	<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].wholeSalePrice" id="wholeSalePrice<s:property value='formBean.order.product_List.size()'/>"  onchange="onWholeSalePriceChange(2,<s:property value='formBean.order.product_List.size()'/>);"   onfocus="this.select();" size='8'/></td>
				 		<td align="center"><input type="text" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].salesPrice" id="salesPrice<s:property value='formBean.order.product_List.size()'/>" readonly="readonly"  size='8'/></td>
				 		<td align="center"><div id="takeBefore<s:property value='formBean.order.product_List.size()'/>" style="display:none;color:red"></div><input type="hidden" name="formBean.order.product_List[<s:property value='formBean.order.product_List.size()'/>].productBarcode.boughtBefore" id="boughtBefore<s:property value='formBean.order.product_List.size()'/>" size='14' value="0"/></td>
				 		<td align="center"><div id="viewIcon<s:property value='formBean.order.product_List.size()'/>" style="display:none"><img src="<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/img3.png" border="0" onclick="viewImgSale('<s:property value="formBean.order.product_List.size()"/>',<s:property value='formBean.order.product_List.size()'/>);"  style="cursor:pointer;"/></div></td>
				 		<td align="center"><div id="clientInfoIcon<s:property value='formBean.order.product_List.size()'/>" style="display:none"><img src="<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/inventory.png" border="0" onclick="viewClientInfor(<s:property value='formBean.order.product_List.size()'/>);"  style="cursor:pointer;"/></div></td>
				 		<td align="center"><div id="delIcon<s:property value='formBean.order.product_List.size()'/>" style="display:none"><img src="<%=request.getContextPath()%>/conf_files/easyUI/themes/icons/delete2.png" border="0" onclick="deleteRow('row<s:property value="formBean.order.product_List.size()"/>',<s:property value='formBean.order.product_List.size()'/>);"  style="cursor:pointer;"/></div></td>			 		
	                </tr>
                </tbody>
                <tr class="<s:if test="formBean.order.order_type == 0">
							    procureTableTop
						    </s:if>
						    <s:elseif test="formBean.order.order_type == 1">
							    returnProcureTableTop
							</s:elseif> height="22">
			 		<td align ="center">总计</td>		 					 		
			 		<td></td>
			 		<td></td>
			 		<td></td>	
			 		<td></td>
			 		<td></td>
			 		<td></td>	
			 		<td></td>	
			 		<td></td>		 					 		
			 		<td align="center"><s:textfield name="formBean.order.totalQuantity" id="totalQuantity" readonly="true" size='2'/></td>			 					 		
			 		<td></td>
			 		<td>&nbsp;</td>
			 		<td>&nbsp;</td>
			 		<td align="center"><s:textfield name="formBean.order.totalWholePrice" id="totalWholePrice" size='8' readonly="true"/></td>
			 		<td align="center"><s:textfield name="formBean.order.totalRetailPrice" id="totalRetailPrice" size='8' readonly="true"/></td>
			 		<td>&nbsp;</td>	
			 		<td>&nbsp;</td>	
			 		<td>&nbsp;</td>		 	
			 		<td>&nbsp;</td>		
                </tr>
                <tr height="10">
			         <td colspan="18" align="left"></td>			 					 		
	            </tr>
				<tr height="10" class="InnerTableContent" >
				  	 <td align ="center">客户备注</td>
					 <td colspan="17"><s:textarea cssClass="easyui-textbox" name="formBean.order.comment" id="comment"  rows="1" cols="80" data-options="prompt:'公开可见的备注信息'"/></td>			 					 				 					 		
				</tr>
                <tr class="InnerTableContent">
                  <td height="27" align="center">公司备注</td>
                  <td colspan="10"><s:textarea cssClass="easyui-textbox" name="formBean.order.comment2" id="comment2"  rows="1" cols="80" data-options="prompt:'客户不可见,仅公司人员可见的备注信息'"/></td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
		 </table>
	     </td>
	  </tr>
